1. Field of the Invention
The present invention relates to a method for managing bad memory blocks in a nonvolatile-memory device, and to a nonvolatile-memory device implementing the management method.
2. Discussion of Related Art
As is known, nonvolatile-memory devices having an architecture of a NAND type have a memory array divided into memory blocks, each of which is in turn divided into sub-blocks referred to as pages. Each page is formed by a given number of bytes, the majority of which, approximately 95%, define the so-called data area, while the remaining bytes define an area reserved to the storage of given information (“page spare area”).
Nonvolatile-memory devices having an architecture of a NAND type can be divided into two major categories according to the number of bad memory blocks that they contain: the first category comprises so-called good nonvolatile-memory devices, which do not contain bad memory blocks, while the second category includes so-called “mostly good” storage devices, which contain a number of bad memory blocks lower than a given threshold.
For the purpose of guaranteeing the execution of a minimum number of write and erase cycles during the life of the storage device, typically one hundred thousand, the nonvolatile-memory devices having an architecture of a NAND type shall not intrinsically contain, when they have just been produced, a number of bad memory blocks higher than a given threshold, typically in the region of 2% of the available memory blocks.
In response to the continuous market requirements, some manufacturers of nonvolatile-memory devices guarantee the execution of a number of write and erase cycles that is decidedly greater than one hundred thousand during the life of the storage device, typically three hundred thousand, so that it is necessary for the number of bad memory blocks that will inevitably be created during the further two hundred thousand write and erase cycles not to be higher than another threshold, typically in the region of 1.8% of the non-bad memory blocks after the first one hundred thousand cycles.
To manage the presence of bad memory blocks, it is known practice to provide, in nonvolatile-memory devices, a certain number of spare memory blocks, in which the bad memory blocks are re-mapped.
For example, in a 512-Mbit flash memory device, with 4096 memory blocks, each formed by 32 pages of 528 bytes each, of which 512 defining the data area and the remaining 16 defining the reserved area, it is necessary to provide a number of spare memory blocks equal to 153, of which 82 have the function of guaranteeing reaching the first one hundred thousand write and erase cycles, and the other 71 have the function of guaranteeing reaching three hundred thousand write and erase cycles.
The management of the bad memory blocks is performed by some manufacturers of nonvolatile-memory devices by dividing the memory array into two physically distinct areas, one reserved to the users (user-block area—UBA), and one reserved to re-mapping of bad memory blocks present in the UBA (reserved-block area—RBA).
In particular, re-mapping of bad memory blocks into spare memory blocks is performed by first constructing a re-directing table, which, for each bad memory block, stores the address of the bad memory block and the address of the corresponding spare memory block, and then re-directing any request for access to said bad memory blocks to the corresponding spare memory blocks.
The re-directing table is then stored permanently in the area of memory reserved to the users and is read whenever the user requests access to a memory block. It is then verified whether the address of the memory block to which access is requested is contained in the re-directing table and, if it is, the address of the spare memory block in which said bad memory block has been re-mapped is read, and the access is then re-directed towards said spare memory block.
Generally, however, the re-directing table involves a rather high occupation of memory, so that its storage typically entails a considerable reduction in the amount of memory actually available to users.